package com.yao.system.controller;


import com.yao.system.annotation.MyAnnotation;
import com.yao.system.entity.Result;
import com.yao.system.entity.dto.CollectionDTO;
import com.yao.system.service.IJobCollectionService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 霖
 * @since 2024-04-22
 */
@RestController
@RequestMapping("/collection")
@RequiredArgsConstructor
public class JobCollectionController {

    private final IJobCollectionService collectionService;

    /**
     * 收藏或取消收藏岗位
     * @return
     */
    @MyAnnotation
    @PostMapping("/change")
    public Result collection(@RequestBody CollectionDTO dto){
        return collectionService.collection(dto);
    }


}
